package Java7_Concurrency_Cookbook.concurrent_custom.custom_thread_pool_executor;

import java.util.Date;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

/**
 * @author lixiangke
 * @date 2017/11/24
 */
public class SleepTwoSecondsTask implements Callable<String> {

    @Override
    public String call() {
        try {
            TimeUnit.SECONDS.sleep(2);
        } catch (InterruptedException e) {
            System.out.println("ERROR");
            //e.printStackTrace();
        }
        return new Date().toString();
    }
}
